package com.mallcloud.mall.mall.api.entity.dto;


import io.swagger.annotations.ApiModel;
import lombok.Data;

@ApiModel(value = "PlateInfo", description = "停车信息")
@Data
public class PlateInfo {
    private String plateNo;
    private String inTime;
    private String outTime;
    private Integer parkLong;
    private String parkLongStr;
    public void setParkLong(Integer parkLong) {
        this.parkLong = parkLong;
        StringBuffer sb = new StringBuffer();
        if(parkLong >= 86400){
            sb.append(parkLong/86400);
            sb.append("天");
            parkLong = parkLong % 86400;
        }
        if(parkLong >= 3600){
            sb.append(parkLong/3600);
            sb.append("小时");
            parkLong = parkLong % 3600;
        }
        sb.append(parkLong/60);
        sb.append("分钟");
        this.parkLongStr = sb.toString();
    }
    private Integer carType;
    private Integer payType;//收费终端
    private Integer payMethod;//付款方式
    private String payname;
    public void setPayMethod(Integer payMethod){
        this.payMethod = payMethod;
        switch (payMethod) {
            case 1:
                this.payname = "现金";
                break;
            case 4:
                this.payname = "微信支付";
                break;
            case 1010:
                this.payname = "优惠券";
                break;
            case 1013:
                this.payname = "会员积分";
                break;
        }
    }
    private Integer parkFee;//停车费用
    private String orderNo;//车场订单号
    private String paidTime;//支付时间
    private Integer paidAmount;//实际支付金额
    private Integer freeTime;//抵扣时间
    private Integer freeMoney;//抵扣金额
    private Integer paySource;//支付来源
    private String billId;//主账单ID
    private String payId;//支付唯一id

}
